package com.shopping.service.service.user;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shopping.common.core.object.ResponseResult;
import com.shopping.common.sp.dto.user.UserDto;
import com.shopping.common.sp.query.user.UserQuery;
import com.shopping.common.sp.model.user.User;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

/**
 * @author: zlw
 * @date: 2024/8/15
 */
public interface UserService extends IService<User> {

    /**
     * 添加用户
     * @param dto
     * @return
     */
    ResponseResult<Void> addUser(UserDto dto);

    /**
     * 根据用户名或者手机号查找用户
     * @param userQuery
     * @return
     */
    ResponseResult<HashMap<String, Object>> userPage(UserQuery userQuery);

    /**
     * 修改用户
     * @param dto
     * @return
     */
    ResponseResult<Void> updateUser(UserDto dto);

    /**
     * 根据id批量删除用户
     * @param userIdList
     * @return
     */
    ResponseResult<Void> deleteUser(List<Long> userIdList);

    /**
     * 根据id获取用户
     * @param userId
     * @return
     */
    ResponseResult<User> userView(Long userId);

    /**
     * 导出用户当前页查询数据
     * @param userQuery
     * @return
     */
    void exportUser(UserQuery userQuery, HttpServletResponse response);
}
